<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<script src="../script/jquery-1.7.1.min.js" type="text/javascript"></script>
<title>Untitled 1</title>
<style type="text/css">
.auto-style1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: medium;
}
.auto-style2 {
	text-align: center;
}
.auto-style3 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: small;
}
.auto-style4 {
	text-align: left;
}
.auto-style5 {
	margin-left: 40px;
}
.auto-style6 {
	border-style: solid;
	border-width: 1px;
}
.auto-style7 {
	text-align: right;
}
</style>

<script type="text/javascript">
$(document).ready(function() {
	window.print();
	
});
</script>
</head>

<body>

<div style="border-style: solid; border-color: inherit; border-width: 2px; width: 626px; height: 704px; " class="auto-style2">
	<div id="header">
	<img alt="Sreepathy Header" height="125" src="../images/sreepathy'.png" width="584" /><br />
		<strong>
	<span class="auto-style1">&nbsp;&nbsp; INSTITUTE OF MANAGEMENT AND 
	TECHNOLOGY&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp; 	VAVANOOR, (VIA) KOOTTANAD, PALAKKAD Dt., KERALA<br />
		</span>
	<span class="auto-style3">Admn Off : Thekke Swamiyar Madom, Pazhaya 
		Nadakkavu, Thrissur - 1<br />
		Ph :0466-2370200, 2371500 , 0487-2424444<br />
		</span></strong></div>
	<div id="body">
		<div class="auto-style4" >
			<p class="auto-style5" style="width: 544px; height: 17px">No : ${bill.id }
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
			Date : <%
DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
String formattedDate = df.format(new Date());
%>
<%=formattedDate %></p>
			<p class="auto-style5" style="width: 544px; height: 17px">
			Name......................................................................................................</p>
			<p class="auto-style5" style="width: 544px; height: 17px">Admission No.................................Dept.....................Sem....................</p>
		</div>
		<p align="center"><b>RECEIPT</b></p>
		<div id="content" class="auto-style2" style="height: 155px">
			<table align="left" class="auto-style6" border="1" style="width: 100%">
				<tr>
					<th>Sl No.</th>
					<th>Item Name;</th>
					<th>Quantity</th>
					<th>Unit Price</th>
					<th>Amount</th>
				</tr>
				<c:forEach items="${salesList}" var="sales" varStatus="status">
				<tr>
					<td>${status.count }</td>
					<td>${sales.productId.product }</td>
					<td>${sales.qtySold}</td>
					<td>${sales.productId.sellingPrice }</td>
					<td>${sales.total }</td>
					<c:set var="Test" value="${sales.total+Test}" scope="page"/>
				</tr>
				</c:forEach>
				
			</table>
			<br />
			<br />
			<br />
			<br />
			<br />
			<p class="auto-style7"><strong>TOTAL&nbsp;&nbsp; :&nbsp; ${Test}</strong></p>
			<br />
			<br />
			<br />
			<br />
			<br/>
			<p>AO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
			Cashier</p>
		</div>
	</div>
	<strong><span class="auto-style3"><br />
	</span></strong></div>

</body>

</html>
